package com.tongqin.distributed.vip;

import java.lang.reflect.Proxy;
import java.util.HashMap;
import java.util.Map;

/**
 * @author yuantongqin
 * @date 2018/8/29 上午10:44
 */
public class GPConfiguration {

    public <T> T getMapper(Class<T> tClass,GPSqlSession sqlSession) {

        return (T) Proxy.newProxyInstance(this.getClass().getClassLoader(),new Class[]{tClass},new GPMapperProxy(sqlSession));
    }

    public static class TestMapperXml{
        public final static String nameSpace = "com.tongqin.distributed.vip.TestMapper";

        public static Map<String,String> sqlMaps = new HashMap<>();
        static {
            sqlMaps.put("selectById","select * from test where id=%d");
        }

    }
}
